<?php 
// $sArr = array(0, 'event', 'sns', 'market', 'editor', 'nbtv3', 'event1', 'event2', 'event3', 'event4', 'ceo', 'chf', 'fm986', 'hwc', 'syb', 'news','nbtv2');
$androidMap = array(
	0=>'http://click.hm.baidu.com/app.gif?ap=265003&ch=40306', //0329更新 旧40300
	'market'=>'http://click.hm.baidu.com/app.gif?ap=265003&ch=40306', //0329更新 旧40300
	'editor'=>'http://click.hm.baidu.com/app.gif?ap=265003&ch=40338', //0329更新 旧38992
	'nbtv3'=>'http://click.hm.baidu.com/app.gif?ap=265003&ch=40328', //0329更新 旧38700
    'fm986'=>'http://click.hm.baidu.com/app.gif?ap=265003&ch=40332', //0329更新 旧38704
	'nbtv2'=>'http://click.hm.baidu.com/app.gif?ap=265003&ch=40329', //0329更新 旧38701
    'volunteer' => 'http://click.hm.baidu.com/app.gif?ap=265003&ch=40331', //0329更新 旧38703
    'nbtv1'=>'http://click.hm.baidu.com/app.gif?ap=265003&ch=40330', //0329更新 旧38702
    'nbtv4'=>'http://click.hm.baidu.com/app.gif?ap=265003&ch=40327', //0329更新 旧38699
    'nbtv5'=>'http://click.hm.baidu.com/app.gif?ap=265003&ch=40326', //0329更新 旧38698
    'nbtv6'=>'http://click.hm.baidu.com/app.gif?ap=265003&ch=40325', //0329更新 旧38697
    'fm904'=>'http://click.hm.baidu.com/app.gif?ap=265003&ch=40321', //0329更新 旧38692
    'fm920'=>'http://click.hm.baidu.com/app.gif?ap=265003&ch=40340', //0329更新 旧38696
    'fm939'=>'http://click.hm.baidu.com/app.gif?ap=265003&ch=40324', //0329更新 旧38695
    'fm1029'=>'http://click.hm.baidu.com/app.gif?ap=265003&ch=40320', //0329更新 旧38691
    'nbydds' => 'http://click.hm.baidu.com/app.gif?ap=265003&ch=40323', //0329更新 旧38694
    'dszb' => 'http://click.hm.baidu.com/app.gif?ap=265003&ch=40322', //0329更新 旧38693
    'update' => 'http://click.hm.baidu.com/app.gif?ap=265003&ch=40337',  //0329更新 旧38823
	'fm920-1' => 'http://click.hm.baidu.com/app.gif?ap=265003&ch=40333', //0329更新 旧38709
	'fm920-2' => 'http://click.hm.baidu.com/app.gif?ap=265003&ch=40334', //0329更新 旧38710
	'fm920-3' => 'http://click.hm.baidu.com/app.gif?ap=265003&ch=40335', //0329更新 旧38711
	'fm920-4' => 'http://click.hm.baidu.com/app.gif?ap=265003&ch=40336', //0329更新 旧38712
	'dfrx' => 'http://click.hm.baidu.com/app.gif?ap=265003&ch=40339', //0329更新 旧39032
);

$iosMap = array(
	0=>'http://click.hm.baidu.com/app.gif?ap=264999&ch=36289',
	'market'=>'http://click.hm.baidu.com/app.gif?ap=264999&ch=36289',
	'editor'=>'http://click.hm.baidu.com/app.gif?ap=264999&ch=38993',
	'nbtv3'=>'http://click.hm.baidu.com/app.gif?ap=264999&ch=36287',
    'ceo'=>'http://click.hm.baidu.com/app.gif?ap=264999&ch=36568',
    'chf'=>'http://click.hm.baidu.com/app.gif?ap=264999&ch=36569',
    'fm986'=>'http://click.hm.baidu.com/app.gif?ap=264999&ch=36633',
	'hwc'=>'http://click.hm.baidu.com/app.gif?ap=264999&ch=36904',
	'syb'=>'http://click.hm.baidu.com/app.gif?ap=264999&ch=36907',
	'news'=>'http://click.hm.baidu.com/app.gif?ap=264999&ch=36978',
	'nbtv2'=>'http://click.hm.baidu.com/app.gif?ap=264999&ch=37068',
	'tyj' => 'http://click.hm.baidu.com/app.gif?ap=264999&ch=37395',
    'volunteer' =>'http://click.hm.baidu.com/app.gif?ap=264999&ch=37827',
    'nbtv1'=>'http://click.hm.baidu.com/app.gif?ap=264999&ch=37921',
    'nbtv4'=>'http://click.hm.baidu.com/app.gif?ap=264999&ch=37922',
    'nbtv5'=>'http://click.hm.baidu.com/app.gif?ap=264999&ch=37923',
    'nbtv6'=>'http://click.hm.baidu.com/app.gif?ap=264999&ch=37924',
    'fm904'=>'http://click.hm.baidu.com/app.gif?ap=264999&ch=37927',
    'fm920'=>'http://click.hm.baidu.com/app.gif?ap=264999&ch=37925',
    'fm939'=>'http://click.hm.baidu.com/app.gif?ap=264999&ch=37926',
    'fm1029'=>'http://click.hm.baidu.com/app.gif?ap=264999&ch=37928',
    'nbydds' => 'http://click.hm.baidu.com/app.gif?ap=264999&ch=37931',
    'dszb'=>'http://click.hm.baidu.com/app.gif?ap=264999&ch=37932',
    'zjb' => 'http://click.hm.baidu.com/app.gif?ap=264999&ch=38079',
    'update' => 'http://click.hm.baidu.com/app.gif?ap=264999&ch=38822', //更新
	'fm920-1' => 'http://click.hm.baidu.com/app.gif?ap=264999&ch=38713',
	'fm920-2' => 'http://click.hm.baidu.com/app.gif?ap=264999&ch=38714',
	'fm920-3' => 'http://click.hm.baidu.com/app.gif?ap=264999&ch=38715',
	'fm920-4' => 'http://click.hm.baidu.com/app.gif?ap=264999&ch=38716',
	'dfrx' => 'http://click.hm.baidu.com/app.gif?ap=264999&ch=39033',   //东方热线
);
$sArr = array_keys($androidMap);

$s = (isset($_GET['s']) && in_array($s, $sArr))? $_GET['s'] : 0;

$iosUrl = $iosMap[$s];
$androidUrl = $androidMap[$s];
?><!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>点看宁波下载</title>
<meta content="target-densitydpi=device-dpi,width=640,maximum-scale=2, user-scalable=0" name="viewport">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="format-detection" content="email=no,address=no,telephone=no">
<meta name="description" content="点看宁波下载">
<meta name="keywords" content="点看宁波下载">
<link href="css/mobile/game.css" rel="stylesheet"/>
<script type="text/javascript" src="js/dist/zepto.js"></script>
<script type="text/javascript" src="js/extend/touch.js"></script>
<script type="text/javascript" src="js/extend/matchMedia.js"></script>
<script type="text/javascript" src="js/extend/event.ortchange.js"></script>
<script type="text/javascript" src="js/extend/parseTpl.js"></script>
<script type="text/javascript" src="js/core/gmu.js"></script>
<script type="text/javascript" src="js/core/event.js"></script>
<script type="text/javascript" src="js/core/widget.js"></script>
<script type="text/javascript" src="js/widget/slider/slider.js"></script>
<script type="text/javascript" src="js/widget/slider/dots.js"></script>
<script type="text/javascript" src="js/widget/slider/$touch.js"></script>
<script type="text/javascript" src="js/tab/tab.js"></script>
<style type="text/css">
    html{height:100%;}
    body{height:100%; background-color:#d1181b; color:#fff;}
    .download_content{width:100%; padding-top:80%; background:url(images/download_bg.jpg) center 30% no-repeat; text-align:center;}
    .android_btn{display:inline-block; width:179px; height:47px; margin-left:25px; background:url(images/android_btn.png);}
    .apple_btn{display:inline-block; width:183px; height:47px;  background:url(images/apple_btn.png);}
    .footer{width:640px; height:51px;text-align:center; position:absolute; bottom:40px;background: url('images/footer.png') center center no-repeat;background-size: 208px 51px;}
    .pop_layer{display:none; position:absolute; right:0; top:0;}
    .pop_bg{display:none; height:100%; width:640px; position:absolute; right:0; top:0; background-color:#000; opacity:0.9;}
</style>

</head>

<body>
	<div class="download_content">
		<div class="">			
			<a class="downloadBtn apple_btn" href="<?php echo $iosUrl?>"></a>
			<a class="downloadBtn android_btn" href="<?php echo $androidUrl?>"></a>
		</div>
		<div class="footer"></div>
	</div>
	<div class="pop pop_bg"></div>
	<div class="pop pop_layer pop_android"><img src="images/xiazai_android.png"></div>
	<div class="pop pop_layer pop_ios"><img src="images/xiazai_ios.png"></div>

</body>
<script type="text/javascript">
	var u = navigator.userAgent, app = navigator.appVersion;
	var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //android终端或�?�uc浏览�?
	var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
	
	              
	$(document).ready(function () {
		download();
		$('.downloadBtn').tap(function() {
			download();
		})
	})

	function download(){
		if(isWeiXin()) {
				$('.pop_bg').css('display','block');
				if(isiOS){
					$('.pop_ios').css('display','block');
				}else{
					$('.pop_android').css('display','block');
				}
				return false;
		}else{
			if(isiOS){
				window.location="<?php echo $iosUrl?>"
			}else if(isAndroid) {
				window.location="<?php echo $androidUrl?>"
			}
		}
	}
	function isWeiXin(){
	    var ua = window.navigator.userAgent.toLowerCase();
	    if(ua.match(/MicroMessenger/i) == 'micromessenger'){
	        return true;
	    }else{
	        return false;
	    }
	}
</script>
</html>
